<template>
	<view class="page">
		<!-- 轮播图 -->
		<u-swiper :list="list" :title="true" height="550" border-radius="0" @click="imgs"></u-swiper>
		<!-- 公告 -->
		<u-notice-bar type="error" mode="horizontal" :list="tips"></u-notice-bar>
		<!-- 下面的导航 -->
		<u-grid :col="3" :border="false">
			<u-grid-item v-for="(item,index) in menu" @click="navs(item.title)" :custom-style="styles">
				<u-avatar :src="item.image" size="120" mode="square"></u-avatar>
				<view v-text="item.title">图片</view>
			</u-grid-item>
		</u-grid>
		<u-notice-bar type="error" mode="horizontal" :list="times"></u-notice-bar>
		<view class="bg_img">
			<u-image width="30%" height="150rpx" src="/static/logo_cn.png"></u-image>
			<u-avatar src="/static/icon/group/11.png" size="120" mode="square"></u-avatar>
			<view style="color: #dbf1e1;">
				时光徽章价格
			</view>
			<view style="color: #ff9900;font-weight: bold;font-size: 40rpx;">
				1921
			</view>
		</view>
		
 		<!--  投诉建议 -->
<!-- 		<u-divider half-width="250">投诉&建议</u-divider> -->
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
						title: '昨夜星辰昨夜风，画楼西畔桂堂东'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
						title: '身无彩凤双飞翼，心有灵犀一点通'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
						title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
					}
				],
				menu:[
					{
						image: '/static/icon/group/1.png',
						title: '攻略'
					},{
						image: '/static/icon/group/2.png',
						title: '物品'
					},{
						image: '/static/icon/group/6.png',
						title: '宏命令'
					},{
						image: '/static/icon/group/7.png',
						title: '金币价格'
					},{
						image: '/static/icon/group/11.png',
						title: '时光徽章'
					},{
						image: '/static/icon/group/12.png',
						title: 'WA库'
					}
				],
				styles:{color: 'red'},
				tips: [
					'寒雨连江夜入吴',
					'平明送客楚山孤',
					'洛阳亲友如相问',
					'一片冰心在玉壶'
				],
				times: [
					'时光徽章',
				]
			}
		},
		onLoad() {

		},
		methods: {
			// 轮播图点击事件
			imgs(index){
				console.log(index)
			},
			// 下面导航的点击事件
			navs(title){
				console.log(title)
				if(title == "攻略"){
					uni.redirectTo({
						url: '/pages/index/list/index' //攻略
					})
				}else if(title == "物品"){
					uni.redirectTo({
						url: '/pages/index/goods/index' //物品
					})
				}else if(title == "宏命令"){
					uni.redirectTo({
						url: '/pages/index/suit/index' //宏命令
					})
				}else if(title == "金币价格"){
					uni.redirectTo({
						url: '/pages/index/region/index' //金币价格
					})
				}else if(title == "时光徽章"){
					uni.redirectTo({
						url: '/pages/index/times/index' //时光徽章
					})
				}else if(title == "WA库"){
					uni.redirectTo({
						url: '/pages/index/wa/index' //wa仓库
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bg_img{
		background-image: url(../../static/wow_bg.jpg);
		width: 100%;
		height: 410rpx;
		opacity: 0.8;
		text-align: center;
	}
</style>
